package learningThread.syn.synchronizedMethodLockObj.synchronizedOther;

public class TestSynchronizeOther {

    public static void main(String[] args) {
        final OperationObj operationObj = new OperationObj();
        Thread thread1 = new Thread("A"){
            @Override
            public void run() {
                operationObj.method(1);
            }
        };
        Thread thread2 = new Thread("B"){
            @Override
            public void run() {
               // operationObj.method(5);
                operationObj.methodOther(5);
            }
        };
        thread1.start();
        thread2.start();
    }
}
